/**
 * 插件
 */
import Constant from 'lib/Constant'
const Api = require('@/api/index').default
const lodash = require('lodash');  // api http://lodashjs.com/docs/

const install = function (Vue, opts = {}) {
    Vue.mixin({
        data(){
            return {
                Api,
                Constant,
                lodash    // lodash
            }
        }
    })
};

// auto install
if (typeof window !== 'undefined' && window.Vue) {
    install(window.Vue);
}

export const CommonPlugins = install;